require(['/js/config.js'],() =>{
	require(['template','header','footer'],(template)=>{
		class details{
			constructor() {
			    this.getList ()
			}
			getList () {
				const id = location.search.slice(4)
				$.ajax({
					url:`http://www.xiongmaoyouxuan.com/api/detail?id=${id}`,
					success:resp => {
						if (resp.code === 200) {
							const { photo } = resp.data.detail
							const { reviewContent } = resp.data.detail.tbItemReview
							const { detail } = resp.data
							console.log(photo)
							console.log(reviewContent)
							console.log( detail)
							$('#goodsClassify').html(
								template('classesnib',{
									photo,
									reviewContent,
									detail
								})
							)
						}
					}
				})
			}
		}
		new details()
	})
})